home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK2.toast / Development Kits / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / DiskInit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  4.5 KB  |  161 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        DiskInit.h
  3.  
  4.      Contains:    Disk Initialization Package ('PACK' 2) Interfaces.
  5.  
  6.      Version:    Technology:    System 8.1
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1985-1995, 1997-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __DISKINIT__
  19. #define __DISKINIT__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47.  
  48. struct HFSDefaults {
  49.     char                             sigWord[2];                    /* signature word */
  50.     long                             abSize;                        /* allocation block size in bytes */
  51.     long                             clpSize;                    /* clump size in bytes */
  52.     long                             nxFreeFN;                    /* next free file number */
  53.     long                             btClpSize;                    /* B-Tree clump size in bytes */
  54.     short                             rsrv1;                        /* reserved */
  55.     short                             rsrv2;                        /* reserved */
  56.     short                             rsrv3;                        /* reserved */
  57. };
  58. typedef struct HFSDefaults                HFSDefaults;
  59.  
  60. enum {
  61.     kHFSPlusDefaultsVersion        = 1
  62. };
  63.  
  64.  
  65. struct HFSPlusDefaults {
  66.     UInt16                             version;                    /* version of this structure */
  67.     UInt16                             flags;                        /* currently undefined; pass zero */
  68.     UInt32                             blockSize;                    /* allocation block size in bytes */
  69.     UInt32                             rsrcClumpSize;                /* clump size for resource forks */
  70.     UInt32                             dataClumpSize;                /* clump size for data forks */
  71.     UInt32                             nextFreeFileID;                /* next free file number */
  72.     UInt32                             catalogClumpSize;            /* clump size for catalog B-tree */
  73.     UInt32                             catalogNodeSize;            /* node size for catalog B-tree */
  74.     UInt32                             extentsClumpSize;            /* clump size for extents B-tree */
  75.     UInt32                             extentsNodeSize;            /* node size for extents B-tree */
  76.     UInt32                             attributesClumpSize;        /* clump size for attributes B-tree */
  77.     UInt32                             attributesNodeSize;            /* node size for attributes B-tree */
  78.     UInt32                             allocationClumpSize;        /* clump size for allocation bitmap file */
  79. };
  80. typedef struct HFSPlusDefaults            HFSPlusDefaults;
  81.  
  82. EXTERN_API( void )
  83. DILoad                            (void)                                                        THREEWORDINLINE(0x7002, 0x3F00, 0xA9E9);
  84.  
  85. EXTERN_API( void )
  86. DIUnload                        (void)                                                        THREEWORDINLINE(0x7004, 0x3F00, 0xA9E9);
  87.  
  88. EXTERN_API( short )
  89. DIBadMount                        (Point                     where,
  90.                                  long                     evtMessage)                            THREEWORDINLINE(0x7000, 0x3F00, 0xA9E9);
  91.  
  92. EXTERN_API( OSErr )
  93. DIFormat                        (short                     drvNum)                                THREEWORDINLINE(0x7006, 0x3F00, 0xA9E9);
  94.  
  95. EXTERN_API( OSErr )
  96. DIVerify                        (short                     drvNum)                                THREEWORDINLINE(0x7008, 0x3F00, 0xA9E9);
  97.  
  98. EXTERN_API( OSErr )
  99. DIZero                            (short                     drvNum,
  100.                                  ConstStr255Param         volName)                            THREEWORDINLINE(0x700A, 0x3F00, 0xA9E9);
  101.  
  102. /*
  103.     DIXFormat, DIXZero, and DIReformat are only available when FSM (File System Manager) is installed.
  104.     FSM is part of Macintosh PC Exchange and System 7.5.
  105. */
  106. EXTERN_API( OSErr )
  107. DIXFormat                        (short                     drvNum,
  108.                                  Boolean                 fmtFlag,
  109.                                  unsigned long             fmtArg,
  110.                                  unsigned long *        actSize)                            THREEWORDINLINE(0x700C, 0x3F00, 0xA9E9);
  111.  
  112. EXTERN_API( OSErr )
  113. DIXZero                            (short                     drvNum,
  114.                                  ConstStr255Param         volName,
  115.                                  short                     fsid,
  116.                                  short                     mediaStatus,
  117.                                  short                     volTypeSelector,
  118.                                  unsigned long             volSize,
  119.                                  void *                    extendedInfoPtr)                    THREEWORDINLINE(0x700E, 0x3F00, 0xA9E9);
  120.  
  121. EXTERN_API( OSErr )
  122. DIReformat                        (short                     drvNum,
  123.                                  short                     fsid,
  124.                                  ConstStr255Param         volName,
  125.                                  ConstStr255Param         msgText)                            THREEWORDINLINE(0x7010, 0x3F00, 0xA9E9);
  126.  
  127.  
  128. #if CGLUESUPPORTED
  129. EXTERN_API_C( OSErr )
  130. dibadmount                        (Point *                where,
  131.                                  long                     evtMessage);
  132.  
  133. EXTERN_API_C( OSErr )
  134. dizero                            (short                     drvnum,
  135.                                  const char *            volName);
  136.  
  137. #endif  /* CGLUESUPPORTED */
  138.  
  139.  
  140.  
  141. #if PRAGMA_STRUCT_ALIGN
  142.     #pragma options align=reset
  143. #elif PRAGMA_STRUCT_PACKPUSH
  144.     #pragma pack(pop)
  145. #elif PRAGMA_STRUCT_PACK
  146.     #pragma pack()
  147. #endif
  148.  
  149. #ifdef PRAGMA_IMPORT_OFF
  150. #pragma import off
  151. #elif PRAGMA_IMPORT
  152. #pragma import reset
  153. #endif
  154.  
  155. #ifdef __cplusplus
  156. }
  157. #endif
  158.  
  159. #endif /* __DISKINIT__ */
  160.  
  161.